package com.yc.AOP.test.aop1.advice;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class MyAdvice {

    @Pointcut("execution(* com.yc.AOP.test.aop1.dao.BookDaoImpl.*(..))")
    public void fn(){}
@Pointcut
    public void fn2(){}
    @Before("fn()")
    public void before(){
        System.out.println(System.currentTimeMillis());
    }
    @After("fn2()")
    public void after(){
        System.out.println(System.currentTimeMillis());
    }
}
